package com.foreknow.mapping;

import com.foreknow.model.Food;

import java.sql.ResultSet;
import java.sql.SQLException;

/**
 * @author shkstart
 * @create 2021-08-14 10:36
 */
public class FoodMapping implements EntityMapping{
    @Override
    public Object mapping(ResultSet rs) throws SQLException {
        Food food=new Food();
        food.setFoodId(rs.getInt("foodId"));
        food.setFoodName(rs.getString("foodName"));
        food.setFoodExplain(rs.getString("foodExplain"));
        food.setFoodPrice(rs.getDouble("foodPrice"));
        food.setBussinessId(rs.getInt("businessId"));
        return food;
    }
}
